package com.company.cloud.art.modules.api.service;


import com.company.cloud.art.modules.api.fallback.ArtArtistRemoteServiceFallbackFactory;
import com.company.cloud.art.modules.api.request.ArtistAddReq;
import com.company.cloud.art.modules.api.request.ArtistDelReq;
import com.company.cloud.art.modules.api.request.ArtistQueryReq;
import com.company.cloud.art.modules.api.request.ArtistUpdateReq;
import com.company.cloud.art.modules.api.response.Artist;
import com.company.cloud.art.modules.api.response.ArtistQueryResp;
import com.company.cloud.common.bean.BaseClientResult;
import com.company.common.server.constant.ServiceNameConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;
import java.util.Set;

@FeignClient(contextId = "artArtist", name = ServiceNameConstant.art_center, fallbackFactory = ArtArtistRemoteServiceFallbackFactory.class)
public interface ArtArtistRemoteService {

    /** 艺术家查询 */
    @RequestMapping(value = "/remote/art/artistQuery", method = RequestMethod.POST)
    public BaseClientResult<ArtistQueryResp> artistQuery(@RequestBody ArtistQueryReq request);

    /** 艺术家信息 */
    @RequestMapping(value = "/remote/art/artistInfo", method = RequestMethod.GET)
    public BaseClientResult<Artist> artistInfo(@RequestParam("artistNo") String artistNo);

    @RequestMapping(value = "/remote/art/artistInfoList", method = RequestMethod.GET)
    public BaseClientResult<List<Artist>> artistInfoList(@RequestParam("artistNos") Set<String> artistNos);

    @RequestMapping(value = "/remote/art/artistInfoMap", method = RequestMethod.GET)
    public BaseClientResult<Map<String,Artist>> artistInfoMap(@RequestParam("artistNos") Set<String> artistNos);


    /** 艺术家 */
    @RequestMapping(value = "/remote/art/artistAdd", method = RequestMethod.POST)
    public BaseClientResult<String> artistAdd(@RequestBody ArtistAddReq request);


    /** 艺术家 */
    @RequestMapping(value = "/remote/art/artistUpdate", method = RequestMethod.POST)
    public BaseClientResult<String> artistUpdate(@RequestBody ArtistUpdateReq request);

    /** 艺术家 */
    @RequestMapping(value = "/remote/art/artistDel", method = RequestMethod.POST)
    public BaseClientResult<String> artistDel(@RequestBody ArtistDelReq request);




}


